#include "TextLog.h"

TextLog::TextLog(wxWindow* parent, wxWindowID id,const wxString value,
        const wxPoint& pos, const wxSize& size,
        long style, const wxValidator& validator,
        const wxString& name):wxTextCtrl(parent,id,value,pos,size,style,validator,name)
{

};

void TextLog::AddLog(const wxString name,const wxString msg)
{
    AppendText(_("\"")+name+_("\"  ")+wxDateTime::Now().Format()+_("\n"));
    AppendText(_("  ")+msg+_(" \n\n"));
    log[name].push_back(msg);
}
wxString TextLog::LastMsg(wxString name)
{
    return log[name].back();
}
